<!DOCTYPE html>
<html lang="en">

<head>
 <meta charset="UTF-8">
 <meta name="viewport"
  content="width=device-width, initial-scale=1.0, minimum-scale=1,maximum-scale=1,user-scalable=no">
 <meta http-equiv="X-UA-Compatible" content="ie=edge">
 <title data-ch="恐龙探险" data-en="Dinosaur Adventure" class="document_title">恐龙探险</title>
 <script src="js/jquery-3.3.1.min.js"></script>
 <script src="js/common.js"></script>
 <script src="js/rem.js"></script>
 <script src="js/layer.js"></script>
 <script type="text/javascript">
  isLogin();
 </script>
 <link rel="stylesheet" href="css/common.css">
 <link rel="stylesheet" type="text/css" href="css/css.css">
</head>

<body>
 <!--头部-->
 <div class="jui_top_bar">
  <a class="jui_top_left" href="javascript:history.back(-1)"><img src="icons/back.png"></a>
  <div class="jui_top_middle" data-ch="我的团队" data-en="My team">我的团队</div>
 </div>
 <!--头部end-->
 <!--主体-->
 <div class="jui_main">
  <ul class="jui_tab_tit" style="position:fixed; width:100%; background:#000; top:0.9rem">
   <li data-type="3" data-ch="第三代" data-en="Level 3">第三代</li>
   <!-- <li data-type="2" data-ch="第二代" data-en="Level 2">第二代</li>
         <li data-type="3" data-ch="第三代" data-en="Level 3">第三代</li> -->
  </ul>
  <!-- 团队列表 -->
  <div class="details" style="padding:0.5rem; margin-top:0.8rem;">
   <div class="col_fff details_name jui_bor_rad_10 bg_light_black" style="display:inline-block; padding:0.1rem 0.4rem; margin-bottom:0.2rem;"></div>
   <div class="details_list"></div>
  </div>
  <!-- 团队列表end -->

  <!-- 没有团队 -->

  <!-- 没有团队end -->
 </div>
 <!--主体end-->
</body>
<script>
 /*可用多个tab */
 $(document).ready(function () {
  let user_id = window.location.href.split("=")[1].split("&&")[0];
  let user_name = window.location.href.split("&&")[1].split("=")[1];
  console.log(user_id, user_name);
  let detailsName = '';
  detailsName = `<div>${user_name}</div>`
  $(".details_name").html(detailsName)
  getList()
  function getList() {
   let data = {
    uid: localStorage.getItem("u_id"),
    token: localStorage.getItem("token"),
    language_type: localStorage.getItem("language_type"),
    tid: window.location.href.split("=")[1]
   }
   $.ajax({
    type: 'post',
    url: baseURL + '/index.php?m=team&c=team_index',
    data: data,
    success: function success(data) {
     data = JSON.parse(data);
     is_login(data);
     if (data.code == 1) {
      let teamList = '';
      if (data.team.length == 0) {
       teamList = `<div>
         <div class="bg_light_black jui_bor_rad_15 jui_flex_col_center jui_pad_20">
          <div class="col_fff" data-ch="他还没有任何团队哦" data-en="You do not have any friend yet">您还没有任何团队哦</div>
          
         </div>
        </div>`
      } else {
       data.team.forEach(function (item) {
        teamList += `<div class="bg_light_black jui_bor_rad_15 jui_flex_col_center team_list">
          <div class="jui_flex_row_center jui_pad_b5">
           <img class="team_icon" src="icons/tx_icon.png">
           <P class="col_fff">
            <span class="col_fff" data-ch="全名：" data-en="Full name: ">全名：</span class="col_fff">
            <span>${item.m_account}</span>
           </P>
          </div>
          <div class="col_fff jui_pad_b5">
           <span class="col_fff" data-ch="账户名称：" data-en="User ID: ">账户名称：</span>
           <span>${item.m_nickname}</span>
          </div>
          <div class="col_fff">
           <span class="col_fff" data-ch="电邮：" data-en="Email: ">电邮：</span class="col_fff">
           <span>${item.m_email}</span>
          </div>
         </div>`
       })
      }
      $(".details_list").html(teamList)
      language()
     } else {
      box_timer(data.msg);
     }
    }
   })
  }
  language();
  documentName()
 });
</script>

</html>